Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Primary Button #2

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/common/Tokens.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
export const Tokens = {
Colors: {
Buttons: {
Primary: "#fff",
Primary: "#7F516A",
Secondary: "#000",
},
},
Borders: {
Radius: {},
Radius: {
PrimaryR: "10px"
},
},
Constraints: {
Margin: {
XSmall: "",
Small: "",
MediumSmall: "",
},
Padding: {},
},
Padding: {
PrimaryP: "16px 40px"
},
Height:{
Large:"66px"
},
Width:{
Large:"345px"
}

};
2 changes: 1 addition & 1 deletion src/components/Buttons/Primary/Button.Primary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type PrimaryButtonProps = PropTypes.InferProps<typeof PrimaryButtonProptypes>;

/**
* ! Primary button Component
* * whitehatdevv - 2022/02/09
* * ricardodsb, stefaranzazu - 2022/02/11
* @param props {any}
*/
const PrimaryButton: React.FC<PrimaryButtonProps> = (props: any) => (
Expand Down
7 changes: 6 additions & 1 deletion src/components/Buttons/Primary/ButtonPrimaryStyled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ import { Tokens } from "../../../common/Tokens";
export const PrimaryButtonStyled = styled.button`
border: none;
background-color: ${Tokens.Colors.Buttons.Primary};
color: #000;
color: #fff;
border-radius: ${Tokens.Borders.Radius.PrimaryR};
padding: ${Tokens.Padding.PrimaryP};
height: ${Tokens.Height.Large};
width: ${Tokens.Width.Large}

`;
6 changes: 3 additions & 3 deletions src/sample/SampleView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import PrimaryButton from "../components/Buttons/Primary/Button.Primary";

/**
* ! Sample view project
* * whitehatdevv - 2022/02/09
* * ricardodsb, stefaranzazu - 2022/02/11
*/
const SampleView: React.FC = () => {
return (
<>
<div className="mt-3">
<h1>Buttons component</h1>
<h1>Primary Button</h1>
<div className="mt-3">
<PrimaryButton
title="Contact"
title="Aceptar todas las cookies"
handleClick={() => {
console.log("He clickado en el botón Contacto");
}}
Expand Down