Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate rail component styles to use utils #621

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/ui/src/components/rail.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.stack {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call the class rail to be more explicit

background: var(--color-neutral-canvas-minimal-bg);
border-right: 1px solid var(--color-neutral-stroke-default);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be var(--component-border-width-md) solid var(--stroke-default)

i would change the stroke-default to subtle

color: var(--color-neutral-canvas-minimal-fg-default);
height: 100%;
padding: var(--component-spacing-xl) var(--component-spacing-md) var(--component-spacing-md);
}
14 changes: 6 additions & 8 deletions packages/ui/src/components/rail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import Settings from '@tokens-studio/icons/Settings.js';
import ShoppingBag from '@tokens-studio/icons/ShoppingBag.js';
import SunLight from '@tokens-studio/icons/SunLight.js';
import TokensStudio from '@/assets/svgs/tokensstudio-logo.svg';
import clsx from 'clsx';
import styles from './rail.module.css';

interface RailItem {
icon: React.ReactNode;
Expand Down Expand Up @@ -101,14 +103,10 @@ export const Rail = () => {
<Stack
justify='between'
direction='column'
style={{
background: 'var(--color-neutral-canvas-minimal-bg)',
borderRight: '1px solid var(--color-neutral-stroke-default)',
color: 'var(--color-neutral-canvas-minimal-fg-default)',
height: '100%',
padding:
'var(--component-spacing-xl) var(--component-spacing-md) var(--component-spacing-md)'
}}
className={clsx(styles.stack, 'ts-canvas')}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update the class here

data-appearance='neutral'
data-emphasis='minimal'

>
<Stack gap={3} direction='column' align='center'>
<Tooltip label={'Tokens Studio'}>
Expand Down
Loading