Skip to content

Commit

Permalink
wip: update
Browse files Browse the repository at this point in the history
  • Loading branch information
ianlnf committed Jun 4, 2024
1 parent 5848ca5 commit 51fbf45
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import { meta } from '@govie-ds/theme-govie';
import { FontTable } from './font-table';

function remToEm(value: string) {
return value.replace('rem', 'em');
}

export function LetterSpacingTable() {
return (
<FontTable<string>
name="letter-spacing"
tokens={meta.light.resolved.primitive.font.letterSpacing}
renderValue={(value) => value}
renderValue={(value) => remToEm(value)}
renderExample={(value) => (
<span style={{ letterSpacing: value }}>Sample text</span>
<span style={{ letterSpacing: remToEm(value) }}>Sample text</span>
)}
/>
);
Expand Down

0 comments on commit 51fbf45

Please sign in to comment.