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

feat(Label): implement css api #1953

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

blasdfaa
Copy link
Contributor

resolved #1905

@blasdfaa blasdfaa requested a review from goshander as a code owner November 15, 2024 05:27
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@gravity-ui-bot
Copy link
Contributor

Visual Tests Report is ready.

@blasdfaa
Copy link
Contributor Author

@goshander do i need to add css api for addons? as i understand it, margin for addons is not calculated now

src/components/Label/Label.scss Outdated Show resolved Hide resolved
@@ -159,3 +159,30 @@ export const ShowcaseStory: Story = {
render: () => <LabelShowcase />,
name: 'Showcase',
};

export const Custom: Story = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Custom story is visually broken now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Custom story is visually broken now

please tell me in more detail what needs to be fixed in this story?

src/components/Label/__stories__/Label.stories.tsx Outdated Show resolved Hide resolved
display: flex;
align-items: baseline;
margin: 0 var(--_--margin-inline);
margin: 0 var(--g-label-margin-inline, var(--_--margin-inline));
Copy link
Contributor

Choose a reason for hiding this comment

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

It can me named --g-label-padding like in Button's CSS API to be consistent, maybe also change prop from margin to padding

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can me named --g-label-padding like in Button's CSS API to be consistent, maybe also change prop from margin to padding

should I definitely change margin to padding? with padding, margin will be larger due to collapse margins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CSS API for Label
3 participants