diff --git a/public/fonts/roboto-100.woff2 b/public/fonts/roboto-100.woff2 new file mode 100644 index 00000000..85c029e1 Binary files /dev/null and b/public/fonts/roboto-100.woff2 differ diff --git a/public/fonts/roboto-300.woff2 b/public/fonts/roboto-300.woff2 new file mode 100644 index 00000000..3e13c5f3 Binary files /dev/null and b/public/fonts/roboto-300.woff2 differ diff --git a/public/fonts/roboto-400.woff2 b/public/fonts/roboto-400.woff2 new file mode 100644 index 00000000..0aa90fc1 Binary files /dev/null and b/public/fonts/roboto-400.woff2 differ diff --git a/public/fonts/roboto-500.woff2 b/public/fonts/roboto-500.woff2 new file mode 100644 index 00000000..8b1aebb2 Binary files /dev/null and b/public/fonts/roboto-500.woff2 differ diff --git a/public/fonts/roboto-700.woff2 b/public/fonts/roboto-700.woff2 new file mode 100644 index 00000000..b102004e Binary files /dev/null and b/public/fonts/roboto-700.woff2 differ diff --git a/public/fonts/roboto-900.woff2 b/public/fonts/roboto-900.woff2 new file mode 100644 index 00000000..beeec681 Binary files /dev/null and b/public/fonts/roboto-900.woff2 differ diff --git a/src/stories/components/Button.stories.tsx b/src/stories/components/Button.stories.tsx index d49daa38..1a6b993e 100644 --- a/src/stories/components/Button.stories.tsx +++ b/src/stories/components/Button.stories.tsx @@ -4,21 +4,21 @@ import React from 'react'; // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export const meta = { - title: 'Components/Common/Button', - component: Button, - parameters: { - // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout - layout: 'centered', - }, - // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs - tags: ['autodocs'], - // More on argTypes: https://storybook.js.org/docs/api/argtypes - args: { - children: 'Button', - }, - argTypes: { - children: { control: 'text' }, - }, + title: 'Components/Common/Button', + component: Button, + parameters: { + // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout + layout: 'centered', + }, + // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs + tags: ['autodocs'], + // More on argTypes: https://storybook.js.org/docs/api/argtypes + args: { + children: 'Button', + }, + argTypes: { + children: { control: 'text' }, + }, } satisfies Meta; export default meta; @@ -26,72 +26,55 @@ type Story = StoryObj; // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args export const Default: Story = { - args: {}, + args: {}, }; export const Disabled: Story = { - args: { - disabled: true, - }, + args: { + disabled: true, + }, }; export const Grid: Story = { - render: props => ( -
-
-
-
-
-
- ), + render: props => ( +
+
+
+
+
+
+ ), }; - // TODO: Actually show the buttons as they appear in the design export const CourseButtons: Story = { - args: { - children: 'Add Course', - }, - render: props => ( -
-
-
-
-
-
- ), - parameters: { - design: { - type: 'figma', - url: 'https://www.figma.com/file/8tsCay2FRqctrdcZ3r9Ahw/UTRP?type=design&node-id=324-389&mode=design&t=BoS5xBrpSsjgQXqv-4', + args: { + children: 'Add Course', + }, + render: props => ( +
+
+
+
+
+
+ ), + parameters: { + design: { + type: 'figma', + url: 'https://www.figma.com/file/8tsCay2FRqctrdcZ3r9Ahw/UTRP?type=design&node-id=324-389&mode=design&t=BoS5xBrpSsjgQXqv-4', + }, }, - }, }; diff --git a/src/views/components/common/Button/Button.module.scss b/src/views/components/common/Button/Button.module.scss index 84b39c9a..90b3ba40 100644 --- a/src/views/components/common/Button/Button.module.scss +++ b/src/views/components/common/Button/Button.module.scss @@ -2,15 +2,18 @@ @use 'src/views/styles/colors.module.scss'; .button { - background-color: #000; - color: #fff; - padding: 10px; + padding: 0px 16px; + height: 40px; margin: 10px; - border-radius: 8px; + border-radius: 4px; border: none; cursor: pointer; transition: all 0.1s ease-in-out; - font-family: 'Inter'; + font-family: 'Roboto'; + font-size: 18px; + font-style: normal; + font-weight: 500; + line-height: normal; display: flex; align-items: center; @@ -34,34 +37,19 @@ } } - @each $color, - $value - in ( - primary: colors.$burnt_orange, - secondary: colors.$charcoal, - tertiary: colors.$bluebonnet, - danger: colors.$speedway_brick, - warning: colors.$tangerine, - success: colors.$turtle_pond, - info: colors.$turquoise - ) - { - &.#{$color} { - background-color: $value; - color: #fff; + &.filled { + background-color: var(--color-primary); + color: var(--color-secondary); + } - &:hover { - background-color: color.adjust($value, $lightness: 10%); - } + &.outline { + background-color: var(--color-secondary); + color: var(--color-primary); + border: 1px solid var(--color-primary); + } - &:focus-visible, - &:active { - background-color: color.adjust($value, $lightness: -10%); - } - - &.disabled { - background-color: $value !important; - } - } + &.single { + background-color: var(--color-secondary); + color: var(--color-primary); } } diff --git a/src/views/components/common/Button/Button.tsx b/src/views/components/common/Button/Button.tsx index 902325bd..b51532bd 100644 --- a/src/views/components/common/Button/Button.tsx +++ b/src/views/components/common/Button/Button.tsx @@ -5,11 +5,16 @@ import styles from './Button.module.scss'; interface Props { className?: string; style?: React.CSSProperties; + type?: 'filled' | 'outline' | 'single'; onClick?: () => void; - type?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning' | 'success' | 'info'; + iconOnly?: boolean; + showSymbol?: boolean; + symbol?: React.ReactNode; disabled?: boolean; title?: string; testId?: string; + primaryColor?: string; + secondaryColor?: string; } /** @@ -17,26 +22,37 @@ interface Props { * @returns */ export function Button({ - style, className, + style, type, - testId, - children, + onClick, + iconOnly, + showSymbol, + symbol, disabled, title, - onClick, + testId, + primaryColor, + secondaryColor, + children, }: React.PropsWithChildren): JSX.Element { return ( ); } diff --git a/src/views/styles/fonts.module.scss b/src/views/styles/fonts.module.scss index 5e609a2f..62521ced 100644 --- a/src/views/styles/fonts.module.scss +++ b/src/views/styles/fonts.module.scss @@ -1,10 +1,20 @@ -@each $weights in '100' '200' '300' '400' '500' '600' '700' '800' '900' { +@each $weight in '100' '200' '300' '400' '500' '600' '700' '800' '900' { @font-face { font-family: 'Inter'; - src: url('@public/fonts/inter-#{$weights}.woff2') format('woff2'); + src: url('@public/fonts/inter-#{$weight}.woff2') format('woff2'); font-display: auto; font-style: normal; - font-weight: #{$weights}; + font-weight: #{$weight}; + } +} + +@each $weight in '100' '300' '400' '500' '700' '900' { + @font-face { + font-family: 'Roboto'; + src: url('@public/fonts/roboto-#{$weight}.woff2') format('woff2'); + font-display: auto; + font-style: normal; + font-weight: #{$weight}; } }