Skip to content

Commit

Permalink
ui: Fixup definition-table + copy-button margin (#10512)
Browse files Browse the repository at this point in the history
  • Loading branch information
johncowen authored Jul 6, 2021
1 parent a6996b6 commit e541a43
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
25 changes: 25 additions & 0 deletions ui/packages/consul-ui/app/components/definition-table/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
class: css
---
# definition-table

Simple CSS component to render a `dl` similar to a table with column headers.
Contents of the `dd` are currently inline-block'ed for CopyButton reasons.

```hbs preview-template
<div class="definition-table">
<dl>
<dt>Title 1</dt>
<dd>Value</dd>
<dt>Title 2</dt>
<dd><CopyButton @name="Title 2" @value="Value"/>Value</dd>
</dl>
</div>
```


```css
.definition-table {
@extend %definition-table;
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[id^='docfy-demo-preview-definition-table'] {
.definition-table {
@extend %definition-table;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
grid-template-columns: 140px auto;
grid-gap: 0.4em 20px;
}
%definition-table .copy-button {
float: left;
%definition-table dd > * {
display: inline-block;
}
1 change: 1 addition & 0 deletions ui/packages/consul-ui/app/styles/debug.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@import 'consul-ui/components/horizontal-kv-list/debug';
@import 'consul-ui/components/icon-definition/debug';
@import 'consul-ui/components/inline-alert/debug';
@import 'consul-ui/components/definition-table/debug';

html.is-debug body > .brand-loader {
display: none !important;
Expand Down

0 comments on commit e541a43

Please sign in to comment.