Skip to content

Commit 6b83700

Browse files
committed
💄 (usage)-fix button usage layout
1 parent 89442f1 commit 6b83700

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

doc/src/components/common/componentData/Button/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const componentData = {
122122
this.style = {
123123
buttonContainer: {
124124
display: "grid",
125-
gridTemplateColumns: "auto auto auto",
125+
gridTemplateColumns: "repeat(auto-fill, 150px)",
126126
gridGap: 20,
127127
alignItems: "center"
128128
}
@@ -138,7 +138,7 @@ export const componentData = {
138138
<div>
139139
{ /* Preview Block-1 */ }
140140
<PreviewBlock header="Styled Buttons">
141-
<PreviewElements>
141+
<PreviewElements style={this.style.buttonContainer}>
142142
143143
{/* Styled Buttons with 'type' prop */}
144144
<Button>Primary</Button>
@@ -149,7 +149,7 @@ export const componentData = {
149149
</PreviewBlock>
150150
{ /* Preview Block-2 */ }
151151
<PreviewBlock header="Bordered Buttons">
152-
<PreviewElements>
152+
<PreviewElements style={this.style.buttonContainer}>
153153
154154
{/* Bordered or Outlined Buttons with 'bordered' prop */}
155155
<Button bordered type="info">info</Button>
@@ -160,7 +160,7 @@ export const componentData = {
160160
</PreviewBlock>
161161
{ /* Preview Block-3 */ }
162162
<PreviewBlock header="Borderless Buttons">
163-
<PreviewElements>
163+
<PreviewElements style={this.style.buttonContainer}>
164164
165165
{/* Borderless buttons with 'borderless' prop */}
166166
<Button type="primary" borderless>Primary</Button>
@@ -171,7 +171,7 @@ export const componentData = {
171171
</PreviewBlock>
172172
{ /* Preview Block-4 */ }
173173
<PreviewBlock header="Flat Buttons">
174-
<PreviewElements>
174+
<PreviewElements style={this.style.buttonContainer}>
175175
176176
{/* No box shadow with 'flat' prop */}
177177
<Button type="success" flat>Success</Button>
@@ -182,7 +182,7 @@ export const componentData = {
182182
</PreviewBlock>
183183
{ /* Preview Block-5 */}
184184
<PreviewBlock header="Buttons with icons and text">
185-
<PreviewElements>
185+
<PreviewElements style={this.style.buttonContainer}>
186186
187187
{/* Icon and text buttons with 'icon' prop */}
188188
<Button type="warning" icon="icon-left">
@@ -199,7 +199,7 @@ export const componentData = {
199199
</PreviewBlock>
200200
{ /* Preview Block-6 */ }
201201
<PreviewBlock header="Sizable Buttons">
202-
<PreviewElements>
202+
<PreviewElements style={this.style.buttonContainer}>
203203
204204
{/* Control button sizes with 'size' prop */}
205205
<Button size="small">

doc/src/components/usage/Usage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const PreviewBlock = ({ children, header }) => (
2121
</div>
2222
);
2323

24-
const PreviewElements = ({ children }) => (
25-
<div className="preview-elements">
24+
const PreviewElements = ({ children, style }) => (
25+
<div className="preview-elements" style={style} >
2626
{children}
2727
</div>
2828
);

0 commit comments

Comments
 (0)