Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Feature 7 - Input Component [Dev] #78

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Conversation

danielvaldivv
Copy link
Contributor

@danielvaldivv danielvaldivv commented Nov 17, 2021

Checklist ✅

resolves [#7 ]

input

@kevfarid kevfarid linked an issue Nov 18, 2021 that may be closed by this pull request
2 tasks
@kevfarid kevfarid removed a link to an issue Nov 18, 2021
2 tasks
@kevfarid kevfarid linked an issue Nov 18, 2021 that may be closed by this pull request
2 tasks
@kevfarid kevfarid added this to the Sprint 5 - UI milestone Nov 18, 2021
@kevfarid kevfarid added components A components feature feature New feature or request labels Nov 18, 2021
@kevfarid
Copy link
Contributor

You remember add the info to Side Bar as: Reviewers, assigners, Labels, Projects, Milestone and Issue. too, add screenshot of the component in the PR.

@danielvaldivv danielvaldivv changed the title Feature 7 Feature 7 - Input Component Nov 18, 2021
@danielvaldivv danielvaldivv added the weight:2 weight:2 label Nov 18, 2021
@@ -58,6 +58,7 @@
}
},
"dependencies": {
"@lerna/bootstrap": "^4.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this package?

const useStyleSheet = createStyleSheet(
(theme, { required, type }) => ({
inputDefault: {
width: 199,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This, and the height are givin issues with the checkbox type. They make it looks huge.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could provide these styles conditionally.

inputDefault: {
width: 199,
height: 40,
borderRadius: 5,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have this in the theme?

width: 199,
height: 40,
borderRadius: 5,
display: 'flex',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I not gettin this one, I removed those styles and the input behave the same. What are you trying to achieve here?

height: 40,
borderRadius: 5,
display: 'flex',
alignContent: 'center',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also applies to the point above.

borderRadius: 5,
display: 'flex',
alignContent: 'center',
alignItems: 'center',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this.

inputStyle: {
padding: theme.spacing(2),
},
}), { key: 'padding' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whe could use here DocsInput instead of padding

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mean of the key is to give a classname prefix.

const { required, type, placeholder, disabled, otherProps } = props;

return <Input
className={classes.inputStyle}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of the useStyleSheet hook 😁. We could change the classname to input instead.

@@ -41,8 +41,9 @@
"start": "next dev"
},
"dependencies": {
"@platzily-ui/icons": "0.1.0",
"@lerna/bootstrap": "^4.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this package?


const InputComponent = () => {

return <Input type="checkbox" />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the one I'm talking that the weight and height are giving troubles. Making it looks huge.

yarn.lock Outdated
@@ -1446,7 +1446,7 @@
pacote "^11.2.6"
semver "^7.3.4"

"@lerna/bootstrap@4.0.0":
"@lerna/bootstrap@4.0.0", "@lerna/bootstrap@^4.0.0":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@danielvaldivv danielvaldivv changed the title Feature 7 - Input Component Feature 7 - Input Component [Dev] Nov 23, 2021
@danielvaldivv danielvaldivv added documentation Improvements or additions to documentation weight:1 something that is easy to do and removed documentation Improvements or additions to documentation weight:2 weight:2 labels Nov 23, 2021
const useStyleSheet = createStyleSheet(
(theme, { width, height }) => ({
inputDefault: {
width: width || 199,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing this why dont we pass a new class when the button is of type checkbox? 🤔

(theme, { width, height }) => ({
inputDefault: {
width: width || 199,
height: height || 40,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here.

@@ -15,7 +15,7 @@ const useStyleSheet = createStyleSheet(
(theme, { color, elevation }) => ({
paper: {
backgroundColor: detectColor(theme, color || 'neutral-tertiary'),
padding: theme.spacing(),
padding: theme.spacing(1),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No needed when the value is one.

@edanfesi edanfesi modified the milestones: Sprint 5 - UI, Sprint 6 - UI Dec 1, 2021
@edanfesi edanfesi added the carry-over-5 task that started in sprint 5 but it's not finished. label Dec 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
carry-over-5 task that started in sprint 5 but it's not finished. components A components feature documentation Improvements or additions to documentation feature New feature or request weight:1 something that is easy to do
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

Feature - Input Component [Dev]
4 participants