Skip to content

Improve components structure #52

Description

@irwinschmitt

Is your feature request related to a problem? Please describe.
Several components are not following the standard structure.

Describe the solution you'd like
A component should have the following structure:

  • /ComponentName
    • /index.jsx
    • /styles.js

All frequently used properties in a component must be added to a new component created from styled-components:

index.jsx

import { StyledGridContainer, StyledGridItem, StyledGridItemContainer } from "./styles";

// ...

<StyledGridContainer />
<StyledGridItem />
<StyledGridItemContainer />

styles.js

import styled from "styled-components";
import MuiGrid from '@material-ui/core/Grid';

// ...

export const StyledGridContainer = styled(MuiGrid).attrs(() => ({
  grid: true,
}))`
  border-radius: 5px;
  // ...
`

export const StyledGridItem = styled(MuiGrid).attrs(() => ({
  item: true,
}))`
  // ...
`

export const StyledGridItemContainer = styled(MuiGrid).attrs(() => ({
  grid: true,
  item: true,
}))`
  // ...
`

Describe alternatives you've considered
We will be happy with any suggestions for improvement you give us.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions