Spaces:
Configuration error
Configuration error
File size: 1,182 Bytes
c132e32 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
import '../css/dist/output.css'
const emote = ['πΊ', 'πΎ', 'π€', 'π§ ', 'π¦Ύ', 'π²', 'π¦', 'π΅', 'π¦', 'π' ,'π', 'π₯', 'π', 'π§¬', 'π', 'π', 'π±', 'π']
const colour_map = {
0 : 'bg-gradient-to-bl from-Retro-light-blue to-Retro-light-pink',
1 : 'bg-gradient-to-bl from-Vapor-Violet to-Vapor-Orange',
2 : 'bg-gradient-to-bl from-Retro-purple to-Vapor-Pink',
3 : 'bg-gradient-to-bl from-Retro-purple to-Vapor-Blue',
4 : 'bg-gradient-to-bl from-Retro-light-pink to-Vapor-Blue',
5 : 'bg-gradient-to-bl from-Vapor-Orange to-Vapor-Violet',
6 : 'bg-gradient-to-bl from-Vapor-Rose to-Vapor-Blue'
}
export const random_emoji = () =>{
return emote[Math.floor(Math.random() * emote.length)]
}
export const random_colour = () => {
return colour_map[Math.floor(Math.random() * Object.keys(colour_map).length)]
}
export const list_of_null = (idx) => {
var list = []
for(var i = 0; i < idx; i++ ) {
list.push(null)
}
return list
}
export const useThemeDetector = () => {
const getCurrentTheme = () => window.matchMedia("(prefers-color-scheme: dark)").matches;
return getCurrentTheme;
} |