Merge pull request #43 from hashicorp/chore-separator

chore: 🤖 add simple separator component - icu 305
This commit is contained in:
Susmitha Girumala authored and GitHub committed 2020-06-09 16:19:20 -04:00
commit e3dd368d4d
7 files changed
+55

No files matched your search

@@ -0,0 +1,7 @@
import Component from '@ember/component';
import layout from '../../templates/components/rose/separator';
export default Component.extend({
layout,
tagName: '',
});
@@ -0,0 +1,23 @@
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
import { hbs } from 'ember-cli-htmlbars';
import { action } from '@storybook/addon-actions';
import { text, boolean, select } from '@storybook/addon-knobs';
<Meta title="Rose|Separator" component="Separator" />
# Separator
A simple styled `<hr>` element.
<Preview>
<Story name="Basic Separator">{{
template: hbs`
<Rose::Separator />
`,
context: {}
}}</Story>
</Preview>
```htmlbars
<Rose::Separator />
```
@@ -5,5 +5,6 @@
@import 'notification';
@import 'card';
@import 'page-header';
@import 'separator';
@import 'nav';
@import 'table';
@@ -0,0 +1,8 @@
@use '../variables/sizing';
.rose-separator {
background-color: var(--ui-gray-subtler-3);
border: 0;
height: sizing.rems(xxxxs);
margin: sizing.rems(l) 0;
}
@@ -0,0 +1 @@
<hr class="rose-separator" />
@@ -0,0 +1 @@
export { default } from 'rose/components/rose/separator';
@@ -0,0 +1,14 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, find } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | rose/separator', function (hooks) {
setupRenderingTest(hooks);
test('it renders', async function (assert) {
assert.expect(1);
await render(hbs`<Rose::Separator />`);
assert.ok(find('.rose-separator'));
});
});