diff --git a/app/scenes/ApiKeyNew/components/ExpiryDatePicker.tsx b/app/scenes/ApiKeyNew/components/ExpiryDatePicker.tsx index eee6cdfc0c..516e9985da 100644 --- a/app/scenes/ApiKeyNew/components/ExpiryDatePicker.tsx +++ b/app/scenes/ApiKeyNew/components/ExpiryDatePicker.tsx @@ -1,5 +1,4 @@ import { format as formatDate } from "date-fns"; -import { CalendarIcon } from "outline-icons"; import * as React from "react"; import { useTranslation } from "react-i18next"; import styled from "styled-components"; @@ -36,7 +35,7 @@ const ExpiryDatePicker = ({ selectedDate, onSelect }: Props) => { return ( - } neutral> + {selectedDate ? formatDate(selectedDate, "MMM dd, yyyy", { locale }) : t("Choose a date")} @@ -61,23 +60,9 @@ const ExpiryDatePicker = ({ selectedDate, onSelect }: Props) => { ); }; -const Icon = () => ( - - - -); - const StyledPopoverButton = styled(Button)` margin-top: 12px; width: 150px; `; -const IconWrapper = styled.span` - display: flex; - justify-content: center; - align-items: center; - width: 24px; - height: 24px; -`; - export default ExpiryDatePicker; diff --git a/app/scenes/ApiKeyNew/index.tsx b/app/scenes/ApiKeyNew/index.tsx index c2c503a347..53064de406 100644 --- a/app/scenes/ApiKeyNew/index.tsx +++ b/app/scenes/ApiKeyNew/index.tsx @@ -122,7 +122,7 @@ function ApiKeyNew({ onSubmit }: Props) { )} . - + e.stopPropagation()} > - {trigger} + {content} e.preventDefault()} > - {/* Lock page scroll while open, matching the inline editor menu. */}