Web: Components: fixed onClick action for link-with-dropdown, updated README.md file
This commit is contained in:
parent
65ad687d02
commit
7cbbf41340
@ -24,7 +24,7 @@ import { LinkWithDropdown } from "asc-web-components";
|
||||
| ------------------- | :------------: | :------: | :------------------------------------: | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `color` | `oneOf` | - | `gray`, `black`, `blue` | `black` | Color of link in all states - hover, active, visited |
|
||||
| `data` | `array` | - | - | - | Array of objects, each can contain `<DropDownItem />` props |
|
||||
| `dropdownType` | `oneOf` | ✅ | `alwaysDotted, appearDottedAfterHover` | - | Type of dropdown: alwaysDotted is always show dotted style and icon of arrow, appearDottedAfterHover is show dotted style and icon arrow only after hover |
|
||||
| `dropdownType` | `oneOf` | ✅ | `alwaysDashed, appearDashedAfterHover` | - | Type of dropdown: alwaysDashed is always show dotted style and icon of arrow, appearDashedAfterHover is show dotted style and icon arrow only after hover |
|
||||
| `fontSize` | `string` | - | - | `13px` | Font size of link |
|
||||
| `fontWeight` |`number, string`| - | - | - | Font weight of link |
|
||||
| `id` | `string` | - | - | - | Accepts id |
|
||||
|
@ -214,8 +214,8 @@ class LinkWithDropdown extends React.Component {
|
||||
{data.map(item => (
|
||||
<DropDownItem
|
||||
key={item.key}
|
||||
onClick={this.onClickDropDownItem.bind(this.props, item)}
|
||||
{...item}
|
||||
onClick={this.onClickDropDownItem.bind(this.props, item)}
|
||||
/>
|
||||
))}
|
||||
</DropDown>
|
||||
@ -227,7 +227,7 @@ class LinkWithDropdown extends React.Component {
|
||||
LinkWithDropdown.propTypes = {
|
||||
color: PropTypes.string,
|
||||
data: PropTypes.array,
|
||||
dropdownType: PropTypes.oneOf(["alwaysDashed", "appearDashedAfterHover"]).isRequired,
|
||||
dropdownType: PropTypes.oneOf(["alwaysDashed", "appearDashedAfterHover"]),
|
||||
fontSize: PropTypes.string,
|
||||
fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
||||
isBold: PropTypes.bool,
|
||||
|
Loading…
Reference in New Issue
Block a user