score:0
replace green
and red
with your desired colors
import react from 'react';
const detailuserkata = (props) => {
return (
<div style={{background-color: props.header === headermodal[1] ? 'green' :
props.header === headermodal[0] ? 'red' :''}
}>
{!props.statuskata ?
<div>obteniendo datos...</div> :
props.statuskata.length ?
<div>
<div classname="statuskata"><label>autor: </label> {props.statuskata[0].author_login_txt}</div>
<div classname="statuskata"><label>cuenta de github: </label> {props.statuskata[0].autor_github_url}</div>
</div> :
<div>not started</div>
}
<div/>
);
}
export default detailuserkata;
and move header
prop to detailuserkata
<modal show={showkata} handleclose={hidemodalkata} title="detalles de la kata">
{<detailuserkata statuskata={detail} header={headermodal[1]} />}
</modal >
Source: stackoverflow.com
Related Query
- I don't know how to change the status of a modal
- How to change The style of a reactstrap modal in react?
- When I click on a link, how can I change the status of another component?
- how to change the status code in Codeigniter 4 To push pages in ReactJS
- React: How can i change the status of toggle switch inside map?
- How to change the status if I clicked on a close button in react js
- i want to retrieve location from promise aaray of open cage geocoding by passing lat and log but dont know how to retrieve the value
- How to change the size/height/width of Modal inside React-Bootstrap?
- How to change color of the JSON message based on status code with ReactJS
- I dont know how to return the result of plus and minus in my React calculator
- How to change Modal state from outside the React class?
- how can i change the status of the username in reactjs using axios?
- How to change the value of a Context with useContext?
- How to change the border color of MUI TextField
- How to fetch the new data in response to React Router change with Redux?
- Visual studio code: how to automatically change the matching closing tag
- How do I change the background color of the body?
- How do I change the dropdown icon in material-ui select field?
- How to close the modal in react native
- How to change the hover color of Material-UI table?
- How do you change the Stepper color on React Material UI?
- How to change the color of a check box in antd?
- How do I trigger the change event on a react-select component with react-testing-library?
- How change the sender name of a mail with nodemailer?
- material UI - How can I change the font size of the label in FormControlLabel
- How to change multiple properties of a state in react (at the same time)?
- How to change the text color of the selected row in material ui table
- How can i change the cell colour in ANTD table according to the value?
- How to use useRef to change the style of a element?
- How do I change the shape of a button in MUI using theme?
More Query from same tag
- nextjs custom responsive detection hook called twice
- Gatsby dynamic slug
- Get filtered data in component table after executing the filter function on dataSource in ant design
- Dynamically set height for Material-UI dropdown menu?
- Error on running code (deps.map is not a function)
- Unexpected token import at routes.js
- How to get input textbox value in parent file from component in React Js
- React-loadable gets chunks only from relative path
- How to remove borders from my react-table
- How to mock a single value in a React Context provider while keeping the rest of values
- How logout using JWT token on ReactJS
- Iterating through HTMLcollection in React,js
- React-notification-system - trigger notification on JSON input
- React react-switch Can't perform a React state update on an unmounted component
- Socket.io only works on reconnect
- React Router , protect static images
- Component renders twice on async React context update
- React hooks: Can't update state inside function component
- Image and Array Fields Send Null on React JS
- How do I store JWT and send them with every request using react
- React Data Grid: Can we restrict input while editing as numeric only?
- textarea onChange not updating the state
- How to use setState in map function
- redux-persist: What's the difference between persist and rehydrate?
- React router link with params
- Passing array down to component and updating it
- Could not able to view data while toggle the button in react. No error
- ReactJS table diff span highlight toggle
- Facing issue while tried to created login form in react
- How to acheive Dynamic Routing in react-router