Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class App extends React.Component {
filtrados = filtrados.filter(item => item.valor >= this.state.filtroMin)
}
if (this.state.regex) {
const regexp = new RegExp(this.state.regex)
const regexp = new RegExp(this.state.regex, 'i')
filtrados = filtrados.filter(item => regexp.test(item.nome))
}
return filtrados
Expand Down
2 changes: 1 addition & 1 deletion src/components/CardProduto/CardProduto.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const CardContainer = styled.div`
display: flex;
flex-direction: column;
padding: 5px;
border: 1px dotted orange;
border: 1px solid black;
margin-top: 5px;
`;
const Imagem = styled.img``;
Expand Down
11 changes: 4 additions & 7 deletions src/components/GridProdutos/GridProdutos.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,30 @@ import CardProduto from "../CardProduto/CardProduto";
const MainContainer = styled.div`
display: grid;
grid-template-rows: 40px 1fr;
margin-top: 30px;
`;

const Header = styled.div`
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
`;

const Quantidade = styled.p`
padding: 10px;
font-size: 20px;
`;

const Ordenacao = styled.select`
margin-right: 10px;
font-size: 15px;
`;

const ContainerProdutos = styled.div`
display: flex;
flex-wrap: wrap;
justify-content: space-around;
/* Funciona com grid e flex, gostei mais de flex, mas vou deixar o grid aqui por enquanto
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
*/
padding: 10px;
border: 1px solid red;
`;

function GridProdutos(props) {
Expand Down