-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from mondaycom/feature/hadas/toast-link
Feature/hadas/toast link
- Loading branch information
Showing
9 changed files
with
155 additions
and
25 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
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
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
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,33 @@ | ||
/* eslint-disable react/jsx-props-no-spreading */ | ||
import React from "react"; | ||
import cx from "classnames"; | ||
import Button from "../../Button/Button"; | ||
|
||
const ToastButton = ({ className, ...buttonProps }) => { | ||
return ( | ||
<Button | ||
{...buttonProps} | ||
className={cx("monday-style-toast-action_button", className)} | ||
size={Button.sizes.SMALL} | ||
color={Button.colors.ON_PRIMARY_COLOR} | ||
/> | ||
); | ||
}; | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
const { size: _sizePropsType, ...buttonPropsTypes } = Button.propTypes; | ||
ToastButton.propTypes = { | ||
...buttonPropsTypes | ||
}; | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
const { size: _sizeDefaultProp, ...linkDefaultPropTypes } = Button.defaultProps; | ||
ToastButton.defaultProps = { | ||
...linkDefaultPropTypes, | ||
size: Button.sizes.SMALL, | ||
kind: Button.kinds.SECONDARY, | ||
marginLeft: false, | ||
isDarkBackground: false | ||
}; | ||
|
||
export default ToastButton; |
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 @@ | ||
/* eslint-disable react/jsx-props-no-spreading */ | ||
import React from "react"; | ||
import cx from "classnames"; | ||
import Link from "../../Link/Link"; | ||
import "./ToastLink.scss"; | ||
|
||
const ToastLink = ({ className, ...linkProps }) => { | ||
const classNames = cx("monday-style-toast-action_link", className); | ||
return <Link {...linkProps} componentClassName={classNames} />; | ||
}; | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
const { componentClassName: _componentClassNamePropsType, ...linkPropsTypes } = Link.propTypes; | ||
ToastLink.propTypes = { | ||
...linkPropsTypes | ||
}; | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
const { componentClassName: _componentClassNameDefaultProp, ...linkDefaultPropTypes } = Link.defaultProps; | ||
ToastLink.defaultProps = { | ||
...linkDefaultPropTypes | ||
}; | ||
|
||
export default ToastLink; |
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,9 @@ | ||
@import "../../../styles/global-css-settings.scss"; | ||
@import "../../../styles/themes.scss"; | ||
|
||
.monday-style-toast-action_link { | ||
@include theme-prop(color, text-color-on-primary); | ||
text-decoration: underline; | ||
-webkit-font-smoothing: auto; | ||
-moz-osx-font-smoothing: auto; | ||
} |
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
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
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