You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

32 lines
959 B

import React, { useState } from "react";
import { Dropdown, DropdownToggle, DropdownMenu } from "reactstrap";
import "../../../components/style/fontStyle.scss";
import Fonts from "./Fonts/fonts";
const Fontstyle = (props) => {
const { bookStyle, setBookStyle } = props;
const [dropdownOpen, setDropdownOpen] = useState(false);
const toggle = () => {
setDropdownOpen(!dropdownOpen)
}
return (
<div>
<Dropdown isOpen={dropdownOpen} toggle={toggle}>
<DropdownToggle id="dropdown-btn">
<button className="btn-font">
<p>{bookStyle.fontFamily === "Sans" ? "سانس" : "نازنین"}</p>
</button>
</DropdownToggle>
<DropdownMenu className="nav-menu-font">
<Fonts setDropdownOpen={setDropdownOpen} dropdownOpen={dropdownOpen} bookStyle={bookStyle} setBookStyle={setBookStyle} />
</DropdownMenu>
</Dropdown>
</div>
);
};
export default Fontstyle;