feat(core): add text primitive

This commit is contained in:
Rahim
2026-06-24 12:12:58 -07:00
parent ce4178778e
commit e07db4f7b2
9 changed files with 279 additions and 13 deletions
@@ -1,4 +1,5 @@
export const seek = {
button: 'relative grid',
label: 'text-[10px] font-medium tracking-tighter tabular-nums',
labelForward: 'absolute -right-px -bottom-0.75',
labelBackward: 'absolute -left-px -bottom-0.75',
+8 -5
View File
@@ -14,6 +14,7 @@ import {
Poster,
SeekButton,
StatusAnnouncer,
Text,
Time,
TimeSlider,
Tooltip,
@@ -45,12 +46,12 @@ import {
error,
fullscreenIcon,
icon,
iconContainer,
iconFlipped,
overlay,
pipIcon,
playIcon,
popup,
seek,
slider,
time,
} from './tailwind/video.tailwind';
@@ -101,8 +102,9 @@ export function DefaultVideoSkin({ className, children }: DefaultVideoSkinProps)
<Tooltip.Root side="top">
<Tooltip.Trigger>
<SeekButton seconds={-SEEK_TIME} className={[iconButton]}>
<SeekIcon className={[icon, iconContainer, iconFlipped]} />
<SeekButton seconds={-SEEK_TIME} className={[iconButton, seek.button]}>
<SeekIcon className={[icon, iconFlipped]} />
<Text className={[seek.label, seek.labelBackward]}>{SEEK_TIME}</Text>
</SeekButton>
</Tooltip.Trigger>
<Tooltip.Popup className={popup.tooltip}>
@@ -113,8 +115,9 @@ export function DefaultVideoSkin({ className, children }: DefaultVideoSkinProps)
<Tooltip.Root side="top">
<Tooltip.Trigger>
<SeekButton seconds={SEEK_TIME} className={[iconButton]}>
<SeekIcon className={[icon, iconContainer]} />
<SeekButton seconds={SEEK_TIME} className={[iconButton, seek.button]}>
<SeekIcon className={icon} />
<Text className={[seek.label, seek.labelForward]}>{SEEK_TIME}</Text>
</SeekButton>
</Tooltip.Trigger>
<Tooltip.Popup className={popup.tooltip}>
@@ -1,4 +1,5 @@
export const seek = {
button: 'relative grid',
label: 'text-[10px] font-medium tracking-tighter tabular-nums',
labelForward: 'absolute -right-px -bottom-0.75',
labelBackward: 'absolute -left-px -bottom-0.75',