Skip to content

Commit

Permalink
refactor(button-loading): add SpinnerContainer outside button functio…
Browse files Browse the repository at this point in the history
…n component
  • Loading branch information
matheushdsbr committed Nov 9, 2023
1 parent e27559c commit 03be129
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/yoga/src/Button/web/Button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ import styled from 'styled-components';
import StyledButton from './StyledButton';
import Spinner from '../../Spinner';

const SpinnerContainer = styled.div`
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
`;

/** Buttons make common actions more obvious and help users more easily perform them. Buttons use labels and sometimes icons to communicate the action that will occur when the user touches them. */
const Button = forwardRef(
(
Expand All @@ -21,13 +28,6 @@ const Button = forwardRef(
},
ref,
) => {
const SpinnerContainer = styled.div`
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
`;

const finalProps = {
...props,
};
Expand Down

0 comments on commit 03be129

Please sign in to comment.