Skip to content

Commit

Permalink
fix some css, fix imports and remove useless functions in toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigui committed Jul 27, 2023
1 parent cec4a60 commit bb8fd7b
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 48 deletions.
76 changes: 38 additions & 38 deletions packages/storybook-docs/src/globalStyles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -189,25 +189,25 @@ html {
font: tokens.$coral-data-m;
}

.sbdocs-content,
.sbdocs-div,
.sbdocs-p,
.sbdocs-ul,
.sbdocs-ol {
content,
div,
p,
ul,
ol {
margin-top: 0;
font: tokens.$coral-paragraph-m;
color: tokens.$coral-color-neutral-text;
}

.sbdocs-li {
li {
font: tokens.$coral-paragraph-m;
color: tokens.$coral-color-neutral-text;
}

.sbdocs-blockquote {
blockquote {
border-left: 4px solid tokens.$coral-color-accent-icon;

.sbdocs-p {
p {
font: tokens.$coral-paragraph-m;
color: tokens.$coral-color-neutral-text-weak;
font-size: 1.6rem;
Expand All @@ -223,7 +223,7 @@ html {
max-width: 100%;
}

.sbdocs-hr {
hr {
border-top: tokens.$coral-border-s-solid tokens.$coral-color-neutral-border-weak;
margin: 0 0 tokens.$coral-spacing-m 0;
}
Expand All @@ -247,7 +247,7 @@ html {
}
}

.sbdocs-h1 {
h1 {
font: tokens.$coral-heading-l;
font-size: 3.2rem;
margin-bottom: tokens.$coral-spacing-xs;
Expand All @@ -260,7 +260,7 @@ html {
margin-top: tokens.$coral-spacing-l;
}

+ .sbdocs-p {
+ p {
font: tokens.$coral-heading-m;
color: tokens.$coral-color-neutral-text-weak;

Expand All @@ -270,32 +270,32 @@ html {
}
}

.sbdocs-h2 {
h2 {
font: tokens.$coral-heading-l;
font-size: 2rem;
border-bottom: tokens.$coral-border-s-solid tokens.$coral-color-neutral-border-weak;
}

.sbdocs-h3 {
h3 {
font: tokens.$coral-heading-m;
}

.sbdocs-h4 {
h4 {
font: tokens.$coral-heading-s;
}

.sbdocs-h5 {
h5 {
font: tokens.$coral-heading-s;
}

.sbdocs-h6 {
h6 {
font: tokens.$coral-heading-s;
}

.sbdocs-p {
p {
margin-bottom: tokens.$coral-spacing-m;

+ .sbdocs-p {
+ .p {
margin-top: calc(#{tokens.$coral-spacing-xs} * -1);
}

Expand All @@ -314,7 +314,7 @@ html {
background: tokens.$coral-color-neutral-background-medium;
}

.sbdocs-a {
a {
font: tokens.$coral-paragraph-m-bold;
color: tokens.$coral-color-accent-text;
transition: tokens.$coral-transition-fast;
Expand All @@ -325,7 +325,7 @@ html {
}
}

.sbdocs-table {
table {
width: 100%;
border-collapse: collapse;
overflow: hidden;
Expand Down Expand Up @@ -379,6 +379,24 @@ html {
footer {
text-align: center;
}

div {
& > dt {
font-size: 1.6rem;
font-weight: 600;
}

& > dt::before {
content: '#';
color: #ff6d70;
padding-right: 1ch;
}

& > dd {
margin: 0.5rem 0;
font-size: 1.4rem;
}
}
}

.sr-only {
Expand All @@ -391,21 +409,3 @@ html {
clip: rect(0, 0, 0, 0);
border: 0;
}

.sbdocs-div {
& > dt {
font-size: 1.6rem;
font-weight: 600;
}

& > dt::before {
content: '#';
color: #ff6d70;
padding-right: 1ch;
}

& > dd {
margin: 0.5rem 0;
font-size: 1.4rem;
}
}
4 changes: 2 additions & 2 deletions packages/storybook/.storybook/docs/Grid.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

.grid {
display: grid;
gap: tokens.$coral-spacing-l calc(#{tokens.$coral-spacing-l}*2);
margin: calc(#{tokens.$coral-spacing-l}*2) 0;
gap: tokens.$coral-spacing-l calc(#{tokens.$coral-spacing-l}* 2);
margin: calc(#{tokens.$coral-spacing-l}* 2) 0 !important;
}
6 changes: 5 additions & 1 deletion packages/storybook/.storybook/docs/StatusTable.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.legend {
margin: tokens.$coral-spacing-m 0;
padding: tokens.$coral-spacing-xs tokens.$coral-spacing-m;
color: tokens.$coral-color-neutral-text-weak;
color: tokens.$coral-color-neutral-text-weak !important;
background: tokens.$coral-color-neutral-background-medium;
border-radius: tokens.$coral-radius-s;
}
Expand All @@ -12,6 +12,10 @@
display: grid;
gap: 1ch;
grid-template: auto / auto 1fr;

dt {
font: tokens.$coral-paragraph-m-bold;
}
}

.table.table {
Expand Down
5 changes: 2 additions & 3 deletions packages/storybook/.storybook/docs/StatusTable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FunctionComponent, Suspense, ReactNode } from 'react';

import { Unstyled } from '@storybook/blocks';
import tokens from '@talend/design-tokens';

import theme from './StatusTable.module.scss';
Expand Down Expand Up @@ -127,7 +126,7 @@ const getComputedHTMLStatus = (status?: ComponentStatus) => {

const StatusTable = (props: FunctionComponent & { filter?: string }) => {
return (
<Unstyled>
<>
<div className={theme.legend}>
<dl className={theme.dl}>
<dt>Figma</dt>
Expand Down Expand Up @@ -181,7 +180,7 @@ const StatusTable = (props: FunctionComponent & { filter?: string }) => {
</tbody>
</table>
</Suspense>
</Unstyled>
</>
);
};

Expand Down
2 changes: 1 addition & 1 deletion packages/storybook/src/Catalog.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Canvas, Meta, Story } from '@storybook/addon-docs';
import { Unstyled, Canvas, Meta, Story } from '@storybook/blocks';
import {
ButtonDestructive,
ButtonIcon,
Expand Down
2 changes: 1 addition & 1 deletion packages/storybook/src/DesignSystem.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/addon-docs';
import { Meta } from '@storybook/blocks';

<Meta title="Principles" />

Expand Down
6 changes: 4 additions & 2 deletions packages/storybook/src/Status.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Meta } from '@storybook/addon-docs';
import { StatusTable } from '~docs';
import { Unstyled, Meta } from '@storybook/blocks';

<Meta title="Component status" />

# Component status

<StatusTable />
<Unstyled>
<StatusTable />
</Unstyled>
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ const defaultPreview = {
},
cmfDecorator
].filter(Boolean),
parameters:{
backgrounds: { disable: true, grid: { disable: true } },
}
};


Expand Down

0 comments on commit bb8fd7b

Please sign in to comment.