20ec481090
This continues iteration on the DAS UI by adding the ability to directly navigate to a recommendation summary by (namespaced) slug and a copy button for the direct navigation link. It includes a change to CopyButton allowing it to take a block that’s rendered within the button. It also changes some instances of multi-relationship traversal to use in-summary attributes, such as summary.jobNamespace instead of summary.job.namespace.name.
27 lines
797 B
JavaScript
27 lines
797 B
JavaScript
import hbs from 'htmlbars-inline-precompile';
|
|
import { withKnobs, text } from '@storybook/addon-knobs';
|
|
|
|
export default {
|
|
title: 'Components|Copy Button',
|
|
decorators: [withKnobs],
|
|
};
|
|
|
|
export let CopyButton = () => {
|
|
return {
|
|
template: hbs`
|
|
<h5 class="title is-5">Copy Button</h5>
|
|
<span class="tag is-hollow is-small no-text-transform">
|
|
{{clipboardText}}
|
|
<CopyButton @clipboardText={{clipboardText}} />
|
|
</span>
|
|
<h5 class="title is-5">Copy Button with content</h5>
|
|
<span class="tag is-hollow is-small no-text-transform">
|
|
<CopyButton @clipboardText={{clipboardText}}>{{clipboardText}}</CopyButton>
|
|
</span>
|
|
`,
|
|
context: {
|
|
clipboardText: text('Clipboard Text', 'e8c898a0-794b-9063-7a7f-bf0c4a405f83'),
|
|
},
|
|
};
|
|
};
|