score:1
You can achieve it in the following way:
import styled from 'styled-components';
const div = styled.div`
padding: 25px 80px;
border-radius: 100px;
margin: 15px 0px;
border: none;
border: 2px solid ${props => props.theme.colors.grey};
&:focus {
outline: none;
border: 2px solid ${props => props.theme.colors.main};
}
&:after {
content: "hi"
}
`;
export default Input;
Input element doesn't allow the use of before and after pseudo classes
Source: stackoverflow.com
Related Query
- How to use pseudo classes in styled components?
- How to use Media Queries inside a React Styled Components Keyframe?
- How to use custom props and theme with material-ui styled components API (Typescript)?
- How to use this.props in React Styled Components
- How to use inheritance with React components and es6 classes
- How to use document.getElementById() with styled components in react?
- How do i use styled components with dynamic imports
- How to use styled components in React in order to get keyframe animations
- With Styled Components why do pseudo classes seem to still work without ampersands?
- How do you use Framer Motion + Styled Components together?
- how to use styled components to style the printing of a component?
- How to use styled components with Material UI input?
- MUI v5 : How to pass css classes to components using className prop? Also I want to use theme in those classes?
- MUI - How to use pseudo class in specific styled component
- How do I get a variable from a graphQl query into a pseudo element in either inline styles or styled components
- How to use styled Components with Material UI Icons
- How to Create global styles with Styled components in react and next js and is it better to use combination of css files and styled component?
- how to use variables conditionally in styled components
- How to use Styled Components for a component passed as props
- How to use JSDoc to document styled components props?
- How to use @media to change width in prop styled components
- How do I use pseudo selectors with material ui's styled api?
- How to use pseudo selectors in material-ui?
- How to use Link components in Menu.List elements
- How to use SCSS variables into my React components
- How to test styled Material-UI components wrapped in withStyles using react-testing-library?
- React: how to use child FormItem components without getting Warning: validateDOMNesting: <form> cannot appear as a descendant of <form>
- How to use react j s components in react native app?
- How to configure Prettier to format Styled Components conditional rendering
- How to use template literals in tailwindcss to change classes dynamically?
More Query from same tag
- Module parse failed error for css loader
- Re renderling AppBar component in React
- how to make variables inside useEffect accessible from outside?
- Getting this warning while running my react app
- Error follow storybook steps to create a libary with react
- Passing multiple props to React component
- Webpack - How to resolve module recursively
- Contentloader gets stuck while updating data using redux
- TypeScript Removing Repetitive Property Assignment with React-Redux
- warning Expected to return a value at the end of arrow function
- Reactjs - Yup : How to check if 2 inputs are equal?
- Allow arbitrary data-* attributes on React component with Typescript
- Is this React prop passing pattern bad for memory?
- React Material UI RadioGroup not working with FormControlLabel returned by component
- GSAP Animations not loading in production
- useEffect won't update state
- Change color of range column chart in ApexCharts
- × Maximum update depth exceeded
- How to pass a custom hook as props and retain parent context?
- Type 'string' is not assignable to type 'undefined'
- ReactFire isn't loading data from Realtime Database
- React Ref Api's
- Material UI icon for Link Button not working
- Element with two classes under className
- Error when attempting to import JSON into a React component: "You may need an appropriate loader", but the correct loader is already installed
- how to change state by setState in React hooks
- React Loading in Stylesheet only when Component is loaded
- redux sagas are blocking the browser
- Webpack + React: Passing arbitrary key-value configuration data into JSX
- Change the opacity outside of a cropping rectangle in konva