Skip to content

Commit cb7da6c

Browse files
committed
Refactor: Tweak examples UI
1 parent ebfd2e4 commit cb7da6c

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

src/rsg-components/Playground/PlaygroundRenderer.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ import Styled from 'rsg-components/Styled';
55
const styles = ({ space, color, borderRadius }) => ({
66
root: {
77
marginBottom: space[4],
8-
border: [[1, color.border, 'solid']],
9-
borderRadius,
108
},
119
preview: {
1210
padding: space[2],
11+
border: [[1, color.border, 'solid']],
12+
borderRadius,
1313
},
1414
controls: {
1515
display: 'flex',
1616
alignItems: 'center',
1717
},
1818
toolbar: {
1919
marginLeft: 'auto',
20-
marginRight: space[2],
2120
},
2221
});
2322

src/rsg-components/ReactComponent/ReactComponentRenderer.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ const styles = ({ color, fontSize, fontFamily, space }) => ({
1212
tabs: {
1313
marginBottom: space[3],
1414
},
15-
tab: {
16-
marginLeft: -space[2],
17-
},
1815
pathLine: {
1916
fontFamily: fontFamily.monospace,
2017
color: color.light,
@@ -50,7 +47,7 @@ export function ReactComponentRenderer({
5047
</div>}
5148
{tabButtons &&
5249
<div className={classes.tabs}>
53-
<div className={classes.tab}>{tabButtons}</div>
50+
{tabButtons}
5451
{tabBody}
5552
</div>}
5653
{examples}

src/rsg-components/ReactComponent/__snapshots__/ReactComponent.spec.js.snap

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,7 @@ exports[`ReactComponentRenderer should render usage section 1`] = `
300300
</header>
301301
<div>
302302
<div>
303-
<div>
304-
tab buttons
305-
</div>
303+
tab buttons
306304
</div>
307305
<div>
308306
tab body

src/rsg-components/TabButton/TabButtonRenderer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import cx from 'classnames';
55

66
export const styles = ({ space, color, fontFamily, fontSize }) => ({
77
button: {
8-
padding: [[space[1], space[2]]],
8+
padding: [[space[1], 0]],
99
fontFamily: fontFamily.base,
1010
fontSize: fontSize.base,
1111
color: color.light,
@@ -24,6 +24,10 @@ export const styles = ({ space, color, fontFamily, fontSize }) => ({
2424
outline: [[1, 'solid', color.linkHover]],
2525
outlineOffset: space[0],
2626
},
27+
'& + &': {
28+
isolate: false,
29+
marginLeft: space[1],
30+
},
2731
},
2832
isActive: {
2933
borderBottom: [[2, color.linkHover, 'solid']],

0 commit comments

Comments
 (0)