Skip to content

Commit 7293dee

Browse files
authored
fix(components): Code inline style bugfix (#1803)
* fix(LP-0000): code inline bugfix * fix(LP-0000): changeset added * fix(components): set inline flex as default
1 parent b64f845 commit 7293dee

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.changeset/cruel-hounds-win.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@launchpad-ui/components": patch
3+
---
4+
5+
Code component inline style bug fix

packages/components/src/styles/Code.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
width: fit-content;
77
background-color: var(--lp-color-bg-ui-tertiary);
88
padding: var(--lp-spacing-100) var(--lp-spacing-200);
9-
display: flex;
9+
display: inline-flex;
1010
border: none;
1111
outline: none;
1212
}

packages/components/stories/Code.stories.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Meta, StoryObj } from '@storybook/react-vite';
22

33
import { Code } from '../src/Code';
4+
import { Text } from '../src/Text';
45

56
const meta: Meta<typeof Code> = {
67
title: 'Components/Content/Code',
@@ -61,3 +62,13 @@ export const Size: Story = {
6162
</div>
6263
),
6364
};
65+
66+
export const Inline: Story = {
67+
render: () => (
68+
<Text>
69+
This paragraph contains inline code like <Code>const variable = "value";</Code> which should
70+
flow naturally within the text. The code component should behave as an inline element, not
71+
breaking the text flow.
72+
</Text>
73+
),
74+
};

0 commit comments

Comments
 (0)