Skip to content

Commit

Permalink
Merge branch 'develop' into addFocus
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanko22 authored Dec 13, 2023
2 parents d69934c + 92dab10 commit c961957
Show file tree
Hide file tree
Showing 19 changed files with 120 additions and 4 deletions.
50 changes: 50 additions & 0 deletions src/js/common/stories/Button.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// import React from 'react';
// import PropTypes from 'prop-types';
// import './button.css';

// /**
// * Primary UI component for user interaction
// */
// export const Button = ({ primary, backgroundColor, size, label, ...props }) => {
// const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
// return (
// <button
// type="button"
// className={['storybook-button', `storybook-button--${size}`, mode].join(' ')}
// style={backgroundColor && { backgroundColor }}
// {...props}
// >
// {label}
// </button>
// );
// };

// Button.propTypes = {
// /**
// * Is this the principal call to action on the page?
// */
// primary: PropTypes.bool,
// /**
// * What background color to use
// */
// backgroundColor: PropTypes.string,
// /**
// * How large should the button be?
// */
// size: PropTypes.oneOf(['small', 'medium', 'large']),
// /**
// * Button contents
// */
// label: PropTypes.string.isRequired,
// /**
// * Optional click handler
// */
// onClick: PropTypes.func,
// };

// Button.defaultProps = {
// backgroundColor: null,
// primary: false,
// size: 'medium',
// onClick: undefined,
// };
Binary file added src/js/common/stories/assets/accessibility.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/js/common/stories/assets/accessibility.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/js/common/stories/assets/addon-library.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/js/common/stories/assets/assets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/js/common/stories/assets/avif-test-image.avif
Binary file not shown.
Binary file added src/js/common/stories/assets/context.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/js/common/stories/assets/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/js/common/stories/assets/docs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/js/common/stories/assets/figma-plugin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/js/common/stories/assets/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/js/common/stories/assets/share.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/js/common/stories/assets/styling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/js/common/stories/assets/testing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/js/common/stories/assets/theming.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/js/common/stories/assets/tutorials.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/js/common/stories/assets/youtube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions src/js/common/stories/button.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.storybook-button {
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 700;
border: 0;
border-radius: 3em;
cursor: pointer;
display: inline-block;
line-height: 1;
}
.storybook-button--primary {
color: white;
background-color: #1ea7fd;
}
.storybook-button--secondary {
color: #333;
background-color: transparent;
box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
}
.storybook-button--small {
font-size: 12px;
padding: 10px 16px;
}
.storybook-button--medium {
font-size: 14px;
padding: 11px 20px;
}
.storybook-button--large {
font-size: 16px;
padding: 12px 24px;
}
5 changes: 1 addition & 4 deletions src/js/components/Buttons/BaseButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ const Button = ({ primary, size, label, onClick, ...props }) => (
onClick={onClick}
{...props}
>
{label}
</StyledButton>
);


export default Button;
Button.propTypes = {
primary: PropTypes.bool,
Expand Down

0 comments on commit c961957

Please sign in to comment.