Commit fd8a6c6
fix: add right margin to <Button kind='inline'/> using icons (#1664)
btn-inline did not have a rule to add margin to svgs in the css, like
other kinds. This should do it in a backwards compatible way, and ensure
all button kinds have the correct margin. We have a bunch of css for
other kinds that would be no longer necessary, but not removing in case
we use it in a non-standard way elsewhere.
```jsx
// previously missing margin between icon and text
<Button kind="inline" icon="dhTruck">Test</Button>
```
edit: was somewhat more complicated then expected, because children
doesn't mean visible children
```jsx
// should handle this case without adding margin
<Button kind="inline" icon="dhTruck"><DropdownMenu/></Button>
```
---------
Co-authored-by: Matthew Runyon <matthewrunyon@deephaven.io>1 parent 1e40d3e commit fd8a6c6
50 files changed
Lines changed: 47 additions & 26 deletions
File tree
- packages
- code-studio/src/styleguide
- components/src
- tests/styleguide.spec.ts-snapshots
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
95 | 93 | | |
96 | 94 | | |
97 | 95 | | |
98 | | - | |
99 | | - | |
100 | | - | |
| 96 | + | |
101 | 97 | | |
102 | | - | |
103 | | - | |
| 98 | + | |
| 99 | + | |
104 | 100 | | |
105 | 101 | | |
106 | 102 | | |
107 | | - | |
108 | | - | |
109 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
110 | 108 | | |
111 | | - | |
112 | | - | |
113 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 119 | + | |
122 | 120 | | |
123 | | - | |
| 121 | + | |
124 | 122 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
129 | 126 | | |
130 | 127 | | |
131 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
129 | 153 | | |
130 | 154 | | |
131 | 155 | | |
| |||
180 | 204 | | |
181 | 205 | | |
182 | 206 | | |
183 | | - | |
| 207 | + | |
184 | 208 | | |
185 | 209 | | |
186 | | - | |
| 210 | + | |
187 | 211 | | |
188 | 212 | | |
189 | 213 | | |
| |||
0 commit comments