saleor-dashboard/src/components/CompanyAddressInput/CompanyAddressInput.tsx

26 lines
683 B
TypeScript
Raw Normal View History

import React from "react";
2019-08-09 10:17:04 +00:00
import { DashboardCard } from "../Card";
import CompanyAddressForm, {
CompanyAddressFormProps,
} from "./CompanyAddressForm";
2019-08-09 10:17:04 +00:00
interface CompanyAddressInputProps extends CompanyAddressFormProps {
2020-01-30 13:17:29 +00:00
header: string;
2019-08-09 10:17:04 +00:00
}
2020-01-30 13:17:29 +00:00
const CompanyAddressInput: React.FC<CompanyAddressInputProps> = props => {
const { header, ...formProps } = props;
2019-10-30 14:34:24 +00:00
return (
<DashboardCard>
<DashboardCard.Title>{header}</DashboardCard.Title>
<DashboardCard.Content>
<CompanyAddressForm {...formProps} />
</DashboardCard.Content>
</DashboardCard>
2019-10-30 14:34:24 +00:00
);
};
2020-01-30 13:17:29 +00:00
CompanyAddressInput.displayName = "CompanyAddressInput";
export default CompanyAddressInput;