Add detectOS function to helper.ts and update style.css with new utility classes

This commit is contained in:
Dede Fuji Abdul
2024-04-06 22:17:19 +07:00
parent b27972b0b5
commit dd6da0f25a
6 changed files with 506 additions and 311 deletions

View File

@@ -37,3 +37,17 @@ export const getDataRowGroup = (data: any): any => {
}
}
}
export const detectOS = () => {
const platform = navigator.userAgent.toLowerCase()
if (platform.includes('mac')) {
return 'macOS'
} else if (platform.includes('win')) {
return 'Windows'
} else if (platform.includes('linux')) {
return 'Linux'
} else {
return 'Unknown'
}
}