-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DP-10502: Adding ButtonFixedFeedback component (#274)
* DP-10502: Adding ButtonFixedFeedback component * DP-10502: changelog
- Loading branch information
1 parent
d051230
commit 51fb461
Showing
6 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
___DESCRIPTION___ | ||
Added | ||
Minor | ||
- (React) DP-10502: Adds ButtonFixedFeedback component. |
Binary file added
BIN
+3.99 KB
...aps_reference/vrt_atoms_buttons_ButtonFixedFeedback_0_document_0_small_atom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
react/src/components/atoms/buttons/ButtonFixedFeedback/ButtonFixedFeedback.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
|
||
import { storiesOf } from '@storybook/react'; | ||
import { withInfo } from '@storybook/addon-info'; | ||
import { withKnobs, text } from '@storybook/addon-knobs/react'; | ||
|
||
import ButtonFixedFeedback from './index'; | ||
|
||
storiesOf('atoms/buttons', module) | ||
.addDecorator(withKnobs) | ||
.add('ButtonFixedFeedback', withInfo(`<div>A fixed position feedback button</div>`)(() => { | ||
const props = { | ||
href: text('ButtonFixedFeedbackOptions.href', '#'), | ||
text: text('ButtonFixedFeedbackOptions.text', 'Feedback') | ||
}; | ||
return( | ||
<ButtonFixedFeedback {...props} /> | ||
); | ||
})); |
24 changes: 24 additions & 0 deletions
24
react/src/components/atoms/buttons/ButtonFixedFeedback/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import './style.css'; | ||
|
||
const ButtonFixedFeedback = (props) => ( | ||
<div | ||
className="ma__fixed-feedback-button" | ||
> | ||
<a href={props.href}>{props.text}</a> | ||
</div> | ||
); | ||
|
||
ButtonFixedFeedback.propTypes = { | ||
href: PropTypes.string, | ||
text: PropTypes.string | ||
} | ||
|
||
ButtonFixedFeedback.defaultProps = { | ||
href: '#', | ||
text: 'Feedback', | ||
} | ||
|
||
export default ButtonFixedFeedback; |
3 changes: 3 additions & 0 deletions
3
react/src/components/atoms/buttons/ButtonFixedFeedback/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@import 'global'; | ||
@import '00-base/z-index'; | ||
@import "01-atoms/fixed-feedback-button"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters