Ni, I'm using a react component, in my react-native app. It transitioned over to react-native fine, except for styling. This is how the component is rendered:
<Leaderboard data={this.state.sampleData} votes="score" artistName="artist" songTitle="name" albumCover="image" id="id" /> It uses the following style sheet when running in web: import "react-h5-audio-player/lib/styles.css";
Unfortunately, react-native doesn't accept .css files. So I created the following styles.js file:
import { StyleSheet } from "react-native"; const styles = StyleSheet.create({ rhap_container: { boxSizing: "border-box", display: "flex", flexDirection: "column", lineHeight: "1", fontFamily: "inherit", width: "100%", padding: "10px 15px", backgroundColor: "#fff", boxShadow: "0 0 3px 0 rgba(0, 0, 0, 0.2)", }, rhap_container_focus_not__focus_visible: { outline: "0", }, rhap_container_svg: { verticalAlign: "initial", }, rhap_header: { marginBottom: "10px", },... I'm stuck now: how do I import this new styles object, so it applies to Leaderboard?