Skip to content

Commit cd2ab36

Browse files
authored
Merge pull request #121 from kaseyvee/dev
fix: responsiveness of codeSnippet
2 parents 0c43c2e + 02bfeeb commit cd2ab36

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
.rustic-code-snippet {
2-
border-radius: 16px 16px 4px 4px;
3-
width: 100%;
4-
height: 100%;
2+
border-radius: 16px 16px 4px 4px;
3+
max-width: calc(100vw - 100px);
54
}
65

76
.rustic-code-snippet p {
8-
padding: 16px;
7+
padding: 16px;
98
}
109

1110
.rustic-code-snippet .cm-editor {
12-
padding: 24px;
13-
overflow-x: auto;
14-
}
11+
padding: 24px;
12+
overflow-x: auto;
13+
}

src/components/codeSnippet/codeSnippet.stories.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,11 @@ export const JS = {
142142
},
143143
}
144144

145-
export const PythonInsideAParentContainer = {
145+
export const Python = {
146146
args: {
147147
code: pyCode,
148148
language: 'Python',
149149
},
150-
decorators: [
151-
(Story: StoryFn) => {
152-
return (
153-
<div style={{ width: '600px' }}>
154-
<Story />
155-
</div>
156-
)
157-
},
158-
],
159150
}
160151

161152
export const PHP = {
@@ -200,7 +191,7 @@ export const HTMLInsideAParentContainer = {
200191
decorators: [
201192
(Story: StoryFn) => {
202193
return (
203-
<div style={{ width: '600px' }}>
194+
<div style={{ maxWidth: '600px' }}>
204195
<Story />
205196
</div>
206197
)

0 commit comments

Comments
 (0)