Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Commit

Permalink
add copy button to display field (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdinicut authored Sep 19, 2019
1 parent c6ae394 commit 67eaf80
Show file tree
Hide file tree
Showing 18 changed files with 620 additions and 111 deletions.
11 changes: 0 additions & 11 deletions .babelrc

This file was deleted.

27 changes: 27 additions & 0 deletions .storybook/src/3.components/display-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,33 @@ storiesOf("Components | Display Field", module)

return <Comp/>;
})

.add("With Copy", () => {
const Comp = (props) => {

return (
<AxisTheme>
<Box gap={'medium'} width={'200px'} pad={'medium'}>
<DisplayField
copy={true}
link={{
href: 'http://google.com',
target: '_blank'
}}
value="Link as Anchor props where you define the target"/>
<DisplayField
copy={true}
label={'Some label'}
value="Some Value that is to long and it does not fit"/>
</Box>

</AxisTheme>
);
}

return <Comp/>;
})

.add("With Link and Label", () => {
const Comp = (props) => {

Expand Down
8 changes: 8 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ module.exports = {
"@babel/preset-react"
],
plugins: [
[
require.resolve('babel-plugin-module-resolver'),
{
alias: {
"@centrifuge/axis-utils": "./packages/utils/src"
}
}
],
[
"@babel/plugin-transform-modules-commonjs",
{ allowTopLevelThis: true }
Expand Down
Loading

0 comments on commit 67eaf80

Please sign in to comment.