Skip to content
Snippets Groups Projects
Unverified Commit 318529a4 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Migrate parameters (#20211)

parent b48aa5f3
No related branches found
Tags v1.42.0-rc2
No related merge requests found
/* eslint-disable react/prop-types */
import React from "react";
import YearPicker from "./YearPicker";
import { Flex } from "grid-styled";
import moment from "moment";
import _ from "underscore";
import cx from "classnames";
import { MonthContainer, MonthList } from "./DateMonthYearWidget.styled";
export default class DateMonthYearWidget extends React.Component {
constructor(props, context) {
......@@ -57,17 +57,17 @@ export default class DateMonthYearWidget extends React.Component {
onChange={year => this.setState({ year: year })}
/>
</div>
<Flex flexWrap="wrap" width="100%" p={1}>
<MonthList>
{_.range(0, 12).map(m => (
<Flex key={m} width={1 / 3} align="center" justifyContent="center">
<MonthContainer key={m}>
<Month
month={m}
selected={m === month}
onClick={() => this.setState({ month: m }, onClose)}
/>
</Flex>
</MonthContainer>
))}
</Flex>
</MonthList>
</div>
);
}
......
import styled from "styled-components";
export const MonthList = styled.div`
display: flex;
flex-wrap: wrap;
width: 100%;
padding: 0.5rem;
`;
export const MonthContainer = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: 33.33%;
`;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment