Skip to content

Commit

Permalink
Enhance component styling and parameters
Browse files Browse the repository at this point in the history
- Removed TODO comments in Button and SegmentedControl components to clean up the codebase.
- Updated Link component to set marginBottom to 0
  • Loading branch information
narin committed Dec 13, 2024
1 parent 87fa448 commit 5402a2d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/components/.storybook/web/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { useDarkMode } from 'storybook-dark-mode'

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
viewport: {
defaultViewport: 'mobile2',
},
controls: {
matchers: {
color: /(background|color)$/i,
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export const Button: React.FC<ButtonProps> = ({
* @returns TextStyle for text
*/
const getTextStyle = (pressed: boolean): TextStyle => {
// TODO: Replace with typography tokens
const font: TextStyle = {

Check failure on line 119 in packages/components/src/components/Button/Button.tsx

View workflow job for this annotation

GitHub Actions / Lint

'font' is already declared in the upper scope on line 8 column 10
...typography.vadsFontBodyLarge,
fontFamily: family.vadsFontFamilySansSerifBold,
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/components/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export const Link: FC<LinkProps> = ({

const textStyle: TextStyle = {
...typography.vadsFontBodyLarge,
marginBottom: 0,
color: linkColor,
textDecorationColor: linkColor,
textDecorationLine: 'underline',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export const SegmentedControl: FC<SegmentedControlProps> = ({
total: labels.length,
})

// TODO: Replace with typography tokens
const textStyle: TextStyle = {
...typography.vadsFontBodyLarge,
fontFamily: isSelected ? 'SourceSansPro-Bold' : 'SourceSansPro-Regular',
Expand Down

0 comments on commit 5402a2d

Please sign in to comment.