Skip to content

Commit

Permalink
feat: storybook preview scss (#749)
Browse files Browse the repository at this point in the history
Signed-off-by: hxtree <[email protected]>
  • Loading branch information
hxtree authored Dec 12, 2023
1 parent 9cc6a04 commit c408cf4
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 13 deletions.
1 change: 1 addition & 0 deletions services/design-system/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Preview } from '@storybook/react';
import '../src/styles/index.scss';

const preview: Preview = {
parameters: {
Expand Down
8 changes: 5 additions & 3 deletions services/design-system/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ publishes a package of those designs for use in other applications.

**Features**:

- Aids in local development of UI components.
- Deploys a static design system website.
- Front-end library containing UI components.
- **UI Component Development**: Allows for the local development of UI
components in isolation.
- **UI Component Library**: This is library containing UI components that
front-ends can use to ensure consistently in design.
- **UI Design System**: Deploys a static design system website.

## Components

Expand Down
9 changes: 2 additions & 7 deletions services/design-system/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import MUIButton, { ButtonProps as MUIButtonProps } from '@mui/material/Button';
import './style.module.scss';

export type ButtonProps = {
selected?: boolean;
Expand All @@ -13,13 +14,7 @@ export const Button = (props: ButtonProps) => {
return (
<MUIButton
{...muiProps}
style={{
...(props.selected && { backgroundColor: '#616366', color: '#FFF' }),
fontFamily: 'Helvetica, arial, sans-serif',
fontWeight: 'bold',
borderRadius: '36px',
padding: '15px 30px 10px 30px',
}}
className='button'
>
{children}
</MUIButton>
Expand Down
17 changes: 17 additions & 0 deletions services/design-system/src/components/Button/style.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.button {
&.select {
background-color: #616366 !important;
color: #FFF !important;
};
font-family: Helvetica, arial, sans-serif !important;
font-weight: bold !important;
border-radius: 36px !important;
padding: 15px 30px 10px 30px !important;
&:focus {
outline-style: solid !important;
outline: #F00;
outline-color: #FFF !important;
outline-offset: -10px !important;
outline-width: 4px !important;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// import './page-footer.scss';
import './style.module.scss';

export type PageFooterLink = {
label: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
font-family: "Eczar", serif;
font-weight: 800;
font-size: 2rem;
color: var(--primary);
// color: var(--primary);
padding: 12px 0;
&.fill {
border-radius: 5px;
padding: 13px;
color: var(--primary);
// color: var(--primary);
};
&.border {
font-size: 4rem;
Expand Down
3 changes: 3 additions & 0 deletions services/design-system/src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@forward '../components/Typography/style.module.scss';
@forward '../components/PageFooter/style.module.scss';
@forward '../components/Button/style.module.scss';

0 comments on commit c408cf4

Please sign in to comment.