📂 FileMgr
📍
/home/coemyoza/public_html/wp-content/plugins/give/src/Views/Components/Label
✏️ Edit File: /home/coemyoza/public_html/wp-content/plugins/give/src/Views/Components/Label/index.js
⬅ Kembali
import classNames from 'classnames'; import styles from './styles.module.scss'; const Label = ({type, text}) => { const labelClasses = classNames( styles.label, {[styles.error]: type === 'error' || type === 'failed'}, {[styles.warning]: type === 'warning'}, {[styles.notice]: type === 'notice'}, {[styles.success]: type === 'success'}, {[styles.info]: type === 'info'}, {[styles.http]: type.toUpperCase() === 'HTTP'} ); const labelText = text && text.length > 0 ? text : type.charAt(0).toUpperCase() + type.slice(1); return <div className={labelClasses}>{labelText}</div>; }; export default Label;
💾 Simpan File
Batal
⬅ Naik ke Components
2 item
Nama
Tipe
Ukuran
Diubah
Aksi
📜
index.js
js
674 B
2022-11-29 18:00
✏️ Edit
👁️ View
🗑 Hapus
📄
styles.module.scss
scss
481 B
2022-11-29 18:00
✏️ Edit
👁️ View
🗑 Hapus