mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2026-08-02 00:00:07 +08:00
Fixing emptybutton issue, updating README
This commit is contained in:
@@ -42,6 +42,7 @@ class App extends Component {
|
||||
|
||||
export default App;
|
||||
````
|
||||
> Need a more extensive example? [Click here](https://github.com/hodgef/simple-keyboard/blob/master/src/demo/App.js).
|
||||
|
||||
# Options
|
||||
You can customize the Keyboard by passing options (props) to it.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "simple-keyboard",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"description": "React.js Virtual Keyboard",
|
||||
"main": "build/index.js",
|
||||
"scripts": {
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ class App extends Component {
|
||||
'.com @ {space}'
|
||||
]
|
||||
}}
|
||||
theme={"myTheme hg-theme-default"}
|
||||
theme={"hg-layout-default hg-theme-default"}
|
||||
debug={true}
|
||||
display={{
|
||||
'{bksp}': 'delete',
|
||||
|
||||
@@ -30,6 +30,8 @@ class Utilities {
|
||||
output = 'openbracket';
|
||||
else if(string === "]")
|
||||
output = 'closebracket';
|
||||
else if(string === "//")
|
||||
output = 'emptybutton';
|
||||
else
|
||||
output = '';
|
||||
|
||||
@@ -37,7 +39,7 @@ class Utilities {
|
||||
}
|
||||
|
||||
static getButtonClass = button => {
|
||||
let buttonTypeClass = button.includes("{") ? "functionBtn" : "standardBtn";
|
||||
let buttonTypeClass = (button.includes("{") && button !== '{//}') ? "functionBtn" : "standardBtn";
|
||||
let buttonWithoutBraces = button.replace("{", "").replace("}", "");
|
||||
|
||||
let buttonNormalized =
|
||||
|
||||
Reference in New Issue
Block a user