Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created November 9, 2022 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BetterProgramming/e63b1e4db68f78f6072680b689bc2ee6 to your computer and use it in GitHub Desktop.
Save BetterProgramming/e63b1e4db68f78f6072680b689bc2ee6 to your computer and use it in GitHub Desktop.
import {Field} from "formik";
import {Form} from "whatever-library-you-use";
const FieldInputWrapper = (props) => <Field {...props} as={Form.Input} />;
export {FieldInputWrapper}
import styled from 'styled-components';
import { FieldInputWrapper } from 'wherever'
const StyledFormInput = styled(FieldInputWrapper).attrs((props) => ({
className: `cool class`,
borderColor: 'blue'
}))`
`;
export { StyledFormInput };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment